//
//  BaseTableViewController.swift
//  MyWeibo
//
//  Created by apple on 15/10/6.
//  Copyright © 2015年 LBL. All rights reserved.
//

import UIKit

class BaseTableViewController: UITableViewController,VisitorLoginViewDelegate {

    var visitorLoginView: VisitorLoginView?
    override func loadView() {
        visitorLoginView = NSBundle.mainBundle().loadNibNamed("VisitorLoginView", owner: nil, options: nil).last as? VisitorLoginView
        visitorLoginView?.visitorViewDelegate = self
        view = visitorLoginView
        
        //添加导航栏左右按钮
        self.navigationItem.leftBarButtonItem = UIBarButtonItem(title: "注册", style: UIBarButtonItemStyle.Plain, target: self, action: "visitorWillRegister")
        self.navigationItem.rightBarButtonItem = UIBarButtonItem(title: "登陆", style: UIBarButtonItemStyle.Plain, target: self, action: "visitorWillLogin")
        
        
        print(view)
    }
    override func viewDidLoad() {
        super.viewDidLoad()


    }
    //实现协议方法
    func visitorWillLogin() {
        print(__FUNCTION__)
        
    }
    func visitorWillRegister() {
        print(__FUNCTION__)

        
    }
}
